﻿<UserControl x:Class="StockAnalyst2.Plugins.Visualization.Historical.HistoricalPluginViewer"
			 x:ClassModifier="internal"
			 
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
			 mc:Ignorable="d" 
			 
             xmlns:Converters="clr-namespace:Utils.Wpf.Converters;assembly=Utils"
             xmlns:Utils="clr-namespace:Utils.Wpf;assembly=Utils"
             xmlns:Historical="clr-namespace:StockAnalyst2.Plugins.Visualization.Historical" 
			 
			 Background="#1F1F1F"	 
			 Utils:AnimatorOnVisibilityChange.AnimationType="Fade"
			 Utils:AnimatorOnVisibilityChange.Duration="1000"		
			 Visibility="Collapsed"
			 
			 d:DesignWidth="1000"
			 d:DataContext="{d:DesignInstance Type=Historical:HistoricalPluginViewerVM}" >

	<UserControl.Resources>
		<ResourceDictionary>
			<Converters:MultiplierConverter x:Key="MultiplierConverter" />
			<Converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
			<ResourceDictionary.MergedDictionaries>
				<ResourceDictionary Source="..\..\..\StockAnalystTheme.xaml" />
			</ResourceDictionary.MergedDictionaries>
		</ResourceDictionary>
	</UserControl.Resources>

	<!--<UserControl.Background>
		<StaticResource ResourceKey="GridBackground" />
	</UserControl.Background>-->

	<Grid>
		<Grid.RowDefinitions>
			<RowDefinition Height="Auto" />
			<RowDefinition Height="Auto" />
			<RowDefinition Height="*" />
		</Grid.RowDefinitions>
		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="*" />
		</Grid.ColumnDefinitions>

		<!-- Control Panel Header -->
		<Border Grid.Row="0" BorderThickness="0" Background="{StaticResource ControlPanelHeaderBackground}" >
			<TextBlock Text="Historical Plugin Control Panel" HorizontalAlignment="Center" Margin="10" FontSize="{Binding FontSize, RelativeSource={RelativeSource AncestorType=UserControl}, Converter={StaticResource MultiplierConverter}, ConverterParameter=1.5}" />
		</Border>

		<!-- Control Panel -->
		<Border Grid.Row="1" BorderThickness="0" BorderBrush="{StaticResource SelectedRowBrush}" >
			<ContentControl Content="{Binding Plugin.HistoricalControlPanel}" Margin="10,0,10,10" />
		</Border>

		<!-- Result Viewer -->
		<Historical:ResultViewer Grid.Row="2" DataContext="{Binding ResultViewerVM}" Visibility="{Binding IsVisible, Converter={StaticResource BooleanToVisibilityConverter}}" Background="Transparent" />
	</Grid>
</UserControl>
